package com.evl.constant;

/**
 * 用户的状态
 *
 * @author fengshuonan
 * @Date 2017年1月22日 下午12:14:59
 */
public enum TrainSeatType {

	top_Tourist(1, "硬上"),
	middle_Tourist(2, "硬中"),
	bottom_Tourist(3, "硬下"),
	top_Soft(4, "软上"),
	bottom_Soft(5, "软下"); 

	public int code;
    public String name;

    TrainSeatType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String valueOf(Integer status) {
        if (status == null) {
            return "";
        } else {
            for (TrainSeatType s : TrainSeatType.values()) {
                if (s.getCode() == status) {
                    return s.getName();
                }
            }
            return "";
        }
    }

}
